/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/cat.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#include "../import/head.h"
#include "../macro/head.h"
#include "jsp_functions.h"

namespace xos_jsp
{
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 

    // 
    // 超级变量取值
    // 
    int supper_variable_to_html( http::i_task * pTask, const char * lpszVariable )
    {
        int ret = 0;
        const char * lpszStr = pTask->super_variable( lpszVariable );
        pTask->http_response()->body_list()->add_str( lpszStr, true );
        return ret;
    }

    // 
    // 标签间内容
    // 
    int html_to_html( http::i_task * pTask, const std::string & str )
    {
        int ret = 0;
        xos_box::i_list * pList = pTask->http_response()->body_list();
        pList->add_data( str.c_str(), (int)str.length(), true );
        return ret;
    }

} // xos_jsp
